package model

import "gorm.io/gorm"

// Material /** 原料
type Material struct {
	gorm.Model
	UserId          int
	Date            *string `gorm:"column:date" form:"date" json:"date"`
	MaterialName    string  `gorm:"column:material_name" form:"materialName" json:"materialName"`          //原料名称
	Specification   float32 `gorm:"column:specification" form:"specification" json:"specification"`        //规格
	CheckoutNumber  float32 `gorm:"column:checkout_number" form:"checkoutNumber" json:"checkoutNumber"`    //结账数量
	MaterialNumber  float32 `gorm:"column:material_number" form:"materialNumber" json:"materialNumber"`    //到货数量
	InventoryNumber float32 `gorm:"column:inventory_number" form:"inventoryNumber" json:"inventoryNumber"` //库存数量
	CheckoutWeight  float32 `gorm:"column:checkout_weight" form:"checkoutWeight" json:"checkoutWeight"`    //结账重量
	MaterialWeight  float32 `gorm:"column:material_weight" form:"materialWeight" json:"materialWeight"`    //实际到货重量
	InventoryWeight float32 `gorm:"column:inventory_weight" form:"inventoryWeight" json:"inventoryWeight"` //库存重量
	UnitPrice       float32 `gorm:"column:unit_price" form:"unitPrice" json:"unitPrice"`                   //单据
	CheckoutPrice   float32 `gorm:"column:checkout_price" form:"checkoutPrice" json:"checkoutPrice"`       //结账金额
	TotalPrice      float32 `gorm:"column:total_price" form:"totalPrice" json:"totalPrice"`                //实际货款金额
	Freight         int     `gorm:"column:freight" form:"freight" json:"freight"`                          //运费
	//Processing      []Processing `gorm:"ForeignKey:MaterialId;AssociationForeignKey:Id" json:"processingList,omitempty"` // 成品加工列表
}
